package com.un.ebs.product.dto;

import com.un.ebs.core.common.KeyValueDto;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

/**
 * @author liubo
 * @email liubocs@163.com
 * @date 2020/4/20 10:27
 */
@Data
public class ProductQueryRequest implements Serializable {

    @NotNull(message = "类别不能为空。")
    private String classId;

    private String searchText;

    private Integer priceMin;

    private Integer priceMax;

    private Boolean onlyCanSale;

    private List<KeyValueDto> attrValues;

    @NotNull(message = "每页大小不能为空。")
    private int pageSize;

    @NotNull(message = "页面索引不能为空。")
    private int pageIndex;

    /**
     * 排序字段名
     */
    private String orderBy;

    /**
     * 取值为 asc 或 desc
     */
    private String orderByType;
}
